package com.green.model.manage.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * 组织类型_大类型
 * @author yinyuqiao
 * 2014-1-3-下午04:07:45
 */
public enum BizTypeEnum {
	CITYUNIT("城市",1),
	INTERMEDIARY("营业部",2), 
	OPERATION("督导运营",3); 
	private BizTypeEnum(String name, int value) {
		this.name = name;
		this.value = value; 
	}
	private String name;
	private int value;
	
	public String getName() {
		return name;
	}
	public int getValue() {
		return value;
	}
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public static List toList(){
		BizTypeEnum[] ary = BizTypeEnum.values();
		List bizType = new ArrayList();
		for(int i=0;i<ary.length;i++){
			Map<String,String> map = new HashMap<String,String>();
			map.put("value", ary[i].toString());
			map.put("name", ary[i].getName());
			bizType.add(map);
		}
		return bizType;
	}
	
}
